package models;

import java.util.*;
import javax.persistence.*;
 
import play.db.jpa.*;
 
@Entity
public class Regate extends Model {

	public String libelle;
	public int nombre_limite_inscriptions;
	public Date date_limite_inscription;
	public Date date_depart;
	public int limite_temps;
	
	public Regate(String libelle, int nombre_limite_inscriptions, Date date_limite_inscription, Date date_depart, int limite_temps)
	{
		this.libelle = libelle;
		this.nombre_limite_inscriptions = nombre_limite_inscriptions;
		this.date_limite_inscription = date_limite_inscription;
		this.date_depart = date_depart;
		this.limite_temps = limite_temps;
	}
	
	public Ligne_passage get_ligne_depart()
	{
		Ligne_passage p = Ligne_passage.find("id_regate",id.intValue()).first();
		return p;
	}
	
}
